/// 发邮件请求入参
class EmailDto {
  /// 接收方邮箱地址
  final String receiveEmail;
  /// 邮件主题
  final String? subject;
  /// 邮件内容
  final String? content;

  EmailDto({
    required this.receiveEmail,
    this.subject,
    this.content,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['receiveEmail'] = receiveEmail;
    if (subject != null) data['subject'] = subject;
    if (content != null) data['content'] = content;
    return data;
  }

  factory EmailDto.fromJson(Map<String, dynamic> json) {
    return EmailDto(
      receiveEmail: json['receiveEmail'],
      subject: json['subject'],
      content: json['content'],
    );
  }
}